# Maintainer: Rémy Oudompheng <remy@archlinux.org>

pkgname=python-cson
pkgver=0.8
pkgrel=6
pkgdesc="A Python parser for Coffeescript Object Notation (CSON)"
arch=('any')
url="https://github.com/avakar/pycson"
license=('MIT')
makedepends=('git'
             'python-setuptools'
             'python-pytest'
             'python-pytest-cov'
             'python-speg')
depends=('python' 'python-six' 'python-speg')
_commit=d2ed07d980382e44726cf3c074957e752ef6441b
source=("git+https://github.com/avakar/pycson.git#tag=${_commit}")
sha256sums=(SKIP)

check() {
  cd "$srcdir"/pycson
  PYTHONPATH=. py.test --cov=cson --cov-report term-missing
}

package() {
  cd "$srcdir"/pycson
  python setup.py install --root="${pkgdir}"
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
